﻿@model List<CallCenter.Web.Controllers.InvoiceEmployeeMailVM>
<div id="EmployeeOverlay" class="k-overlay" style="display: block; z-index: 10002; opacity: 0.5;"></div>
<div class="k-widget k-window" data-role="draggable" style="padding-top: 29px; min-width: 200px; min-height: 100px; display: block; top: 0px; left: 483px; z-index: 10003; opacity: 1; transform: scale(1); margin-top: 100px;">
    <div class="k-window-titlebar k-header" style="margin-top: -29px;">
        &nbsp;<span class="k-window-title">Send Invoice Report</span><div class="k-window-actions"><a role="button" href="#" class="k-window-action k-link" onclick="CloseSendReport()"><span role="presentation" class="k-icon k-i-close">Close</span></a></div>
    </div>
    <div class="k-popup-edit-form k-window-content k-content" data-role="window" tabindex="0" style="margin-left: 13%;">
        <input type="hidden" id="hdnInvoiceID" name="name" value="@ViewBag.InvoiceId" />
        <input type="hidden"  id="hdnCompanyId" name="name" value="@ViewBag.CompanyId" />
        @if (Model.Where(m => m.email != null && m.email != "" && m.Role == "InvoiceEmployee").Distinct().Count() > 0)
        {
            <div style="margin-bottom: 10px; font-weight: bold; font-size: 15px;">Project and Lead Developer</div>
            <table>
                @foreach (var item in Model.Where(m => m.Role == "InvoiceEmployee").Distinct().ToList())
                {
                    <tr>
                        <td>
                            <label style="padding: 5px;">
                                @if (@item.email != null && @item.email != "")
                                {
                                    <input class="chkChild" type="checkbox" name="mail" value="@item.email" />
                                }
                                else
                                {
                                    <input class="chkChild" type="checkbox" name="mail" disabled="disabled" value="@item.email"  title="Mail id is missing"/>
                                }
                            </label>
                        </td>
                        <td>
                            <label style="padding: 5px;">
                                @item.lastName.Trim()  @item.firstName.Trim()
                            </label>
                        </td>
                    </tr>
                }
            </table>

        }
    
    </div>

    <div class="k-edit-buttons k-state-default">
        <a class="k-button k-button-icontext k-primary k-grid-update" href="#" onclick="SendInvoicePDFReport()">
            <span class="k-icon k-update"></span>Send Report</a>
        <a class="k-button k-button-icontext k-grid-cancel" href="#" onclick="CloseInvoicePDFReport()"><span class="k-icon k-cancel"></span>Cancel</a>
    </div>
</div>
